<template>
  <div class="qr-code">
    <el-image class="qr-code-img" :src="qrCode['QrCodeUrl']" fit="cover">
      <div slot="error" class="image-slot">
        <i style="font-size:100px;" class="el-icon-picture-outline"></i>
      </div>
    </el-image>

    <el-row
      v-if="qrCode.ModifyTime"
      class="created-time"
      type="flex"
      justify="center"
      align="middle"
      style="min-height = 30px;"
      v-text="$options.filters.timeFilter(qrCode['ModifyTime'])"
    ></el-row>
  </div>
</template>

<script>
export default {
  name: 'ToolsQrCode',
  data() {
    return {
      qrCode: this.$store.getters['nedb/qrCode']
    }
  }
}
</script>

<style lang="scss" scoped>
.qr-code {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  //   overflow: hidden;
  //   border: solid red 1px;
  .qr-code-img {
    width: 80%;
    height: auto;
    max-width: 400px;
    text-align: center;
  }
}
</style>
